import httpRequest from '@/request'
import appConfig from '@/config/index'

// 账号列表分页
export function accountListPage (params: any) {
  return httpRequest({
    url: `${appConfig.api}sysuser/search`,
    method: 'post',
    data: params
  })
}

// 新增账号
export function accountInsert (params: any) {
  return httpRequest({
    url: `${appConfig.api}sysuser/create`,
    method: 'post',
    data: params
  })
}

// 编辑账号
export function accountUpdate (params: any) {
  return httpRequest({
    url: `${appConfig.api}sysuser/update`,
    method: 'post',
    data: params
  })
}

// 删除账号
export function accountDelete (params: any) {
  return httpRequest({
    url: `${appConfig.api}sysuser/delete`,
    method: 'post',
    data: params
  })
}

// 重置密码
export function pwdReset (params: any) {
  return httpRequest({
    url: `${appConfig.api}sysuser/reset`,
    method: 'post',
    data: params
  })
}
